package cn.jtfadmin.cms.service.impl;

import cn.jtfadmin.base.lang.common.domain.dto.EditPDTO;
import cn.jtfadmin.cms.domain.dto.CmsAddPDTO;
import cn.jtfadmin.cms.domain.dto.CmsEditPDTO;
import cn.jtfadmin.cms.domain.entity.CmsEntity;
import cn.jtfadmin.cms.repository.CmsRepository;
import cn.jtfadmin.cms.service.CmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.support.JpaRepositoryImplementation;
import org.springframework.stereotype.Service;

/**
 * cms 服务实现类
 * @author jtf
 * @since 0.0.1
 */
@Service
public class CmsServiceImpl extends cn.jtfadmin.base.data.jpa.service.JpaService<CmsEntity> implements CmsService {

    @Autowired
    private CmsRepository repository;

    @Override
    protected JpaRepositoryImplementation<CmsEntity, String> getJpaRepository() {
        return repository;
    }

    @Override
    protected Class<?> getAddClass() {
        return CmsAddPDTO.class;
    }

    @Override
    protected Class<? extends EditPDTO> getEditClass() {
        return CmsEditPDTO.class;
    }

}
